package wnhz.com.business.forget;

import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.RelativeLayout;

import butterknife.BindView;
import butterknife.ButterKnife;
import wnhz.com.business.R;
import wnhz.com.business.base.BaseActivity;
import wnhz.com.business.changepwd.ChangePwd1Activity;
import wnhz.com.business.impl.ActionBarClickListener;
import wnhz.com.business.view.TranslucentActionBar;

public class AmentPasswordActivity extends BaseActivity implements View.OnClickListener, ActionBarClickListener {
    static final String TAG = "AmentPasswordActivity";


    @BindView(R.id.actionbar)
    TranslucentActionBar actionbar;
    @BindView(R.id.rl_changepwd_login)//修改密码_登录密码
    RelativeLayout rlChangepwdLogin;
    @BindView(R.id.rl_changepwd_pay)//修改密码_支付密码
    RelativeLayout rlChangepwdPay;

    public static Intent createIntent(Context context) {
        Intent intent = new Intent(context, AmentPasswordActivity.class);
        return intent;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_ament_password);
        ButterKnife.bind(this);

        actionbar.setData("", R.drawable.ic_lefft_white, null, 0, null, 0, this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
            this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
            actionbar.setStatusBarHeight(getStatusBarHeight());
        }
        initView();
    }

    private void initView() {
        rlChangepwdLogin.setOnClickListener(this);
        rlChangepwdPay.setOnClickListener(this);
    }


//    5 修改交易密码  6 修改登录密码
    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch (v.getId()) {
            case R.id.rl_changepwd_login:
                intent = new Intent(AmentPasswordActivity.this, ChangePwd1Activity.class);
                intent.putExtra("type","6");
                startActivity(intent);
                break;
            case R.id.rl_changepwd_pay:
                intent = new Intent(AmentPasswordActivity.this, ChangePwd1Activity.class);
                intent.putExtra("type","5");
                startActivity(intent);
                break;
            default:
                break;
        }

    }


    @Override
    public void onLeftClick() {
        finish();
    }

    @Override
    public void onRightClick() {

    }

    @Override
    public void onEditTextClick() {

    }
}
